import request from '@/utils/request'

export default {

    //带条件的分页查询
    getUserPageVo(current, limit, userQuery) {
        return request({
            url: `/inner/user/getUserPageVo/${current}/${limit}`,
            method: 'post',
            data: userQuery //转化json传递
        })
    },
    //根据删除用户，不能算是算出操作，我们修改用户，把用户的状态从0变成2
    updateTeacherById(id) {
        return request({
            url: `/inner/user/updateTeacherById/${id}`,
            method: 'delete',
        })
    },
    //根据id查询数据，做回显
    getUserById(id){
        return request({
            url: `/inner/user/getUserById/${id}`,
            method: 'get'
          })
    },
    //执行修改操作
    updateUser(user){
        return request({
            url: `/inner/user/updateUser`,
            method: 'post',
            data: user   //转化json传递
        })
    },
    // 查询所有用户
    getAllTeacher(){
        return request({
            url: `/eduservice/eduteacher`,
            method: 'get',
        })
    },
    //获取七天内注册的人数
    getSeventUser(searchObjVo){
        return request({
            url: `/inner/user/getSeventUser`,
            method: 'post',
            data: searchObjVo //转化json传递
        })
    }
}